add exec.LookPath to check operator-sdk is in $PATH #1209
+14
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The ux when a user does not have
operator-sdk
in their path leads to a confusing error that is hard to track down.Current Error Message:
This error is not clear at all what is going on, but we do not have direct control of this once we shell out to
operator-sdk
Changes
Add an explicit check to make sure that
operator-sdk
binary is in the usersPATH
. This provides an error message that is more clearer.New Error Message:
Note
Since this is in the
Scorecard
method, it does not matter which checkBasic
orOlmSuite
gets called, this error will appear.